cmake_minimum_required(VERSION 2.8)

set(CMAKE_CXX_STANDARD 17)

project(dev_sqlite CXX)

if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
    include_directories(${CMAKE_SOURCE_DIR}/thirdParty/sqlite-autoconf-3450200/x86lib/include)
    link_directories(${CMAKE_SOURCE_DIR}/thirdParty/sqlite-autoconf-3450200/x86lib/lib)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
    include_directories(${CMAKE_SOURCE_DIR}/thirdParty/sqlite-autoconf-3450200/aarch64lib/include)
    link_directories(${CMAKE_SOURCE_DIR}/thirdParty/sqlite-autoconf-3450200/aarch64lib/lib)
endif()

include_directories(${CMAKE_SOURCE_DIR}/thirdParty/spdlog)
include_directories(${CMAKE_SOURCE_DIR}/threadPool)
include_directories(${CMAKE_SOURCE_DIR}/mqtt)
include_directories(${CMAKE_SOURCE_DIR}/sql)
include_directories(${CMAKE_SOURCE_DIR}/log)

add_definitions(-DCONSOLE_LOG_ENABLE)
add_definitions(-DLOG_FILE_NAME="/home/hx/hehehe.log")

aux_source_directory(. SRC)

add_executable(${PROJECT_NAME} ${SRC})

target_link_libraries(${PROJECT_NAME} sqlite3 pthread dl)
